<%@ page contentType="text/html;charset=UTF-8" %>
<!doctype html>
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <title>狼码客户关系管理系统</title>
  <%@include file="/static/common/common.jsp"%>
  <link rel="stylesheet" href="/static/css/style.css">
  <style>
    body{
      background-color: #0ca3d2;
    }
  </style>
</head>
<body>
<section class="container">
  <div class="login">
    <h1>用户登录</h1>
    <form method="post" id="loginForm">
      <p><input type="text" name="username" value="admin" placeholder="账号"></p>
      <p><input type="password" name="password" value="1" placeholder="密码"></p>
      <p class="submit">
        <input id="loginBtn" type="button" value="登录">
        <input type="button" value="重置">
      </p>
    </form>
  </div>
</section>
<div style="text-align:center;" class="login-help">
	<p>Copyright ©2017 狼码教育科技有限公司</p>
</div>
<script>
  $('#loginBtn').click(function () {
    var data = $("#loginForm").serialize();
    $.post('/login.do', data, function (data) {
      if (data.success) {
        parent.location.href = '/index.do';
      } else {
        $.messager.alert('温馨提示', data.msg, 'warning');
      }
    })
  })
</script>
</body>
</html>